import '../ModalseeS2/ModalseeS2.css'
import React, { useState } from 'react';
import { Modal, Button } from 'antd'
import {
    Form,
    Input,
    Radio,
    Select,
} from 'antd';
const ModaladdS = () => {
    const { TextArea } = Input;
    const onChange2 = e => {
        console.log('Change:', e.target.value);
    };
    const onChange = e => {
        console.log(e);
    };
    // 添加
    const [isModalVisible4, setIsModalVisible4] = useState(false);

    const showModal4 = () => {
        setIsModalVisible4(true);
    };

    const handleOk4 = () => {
        setIsModalVisible4(false);
    };

    const handleCancel4 = () => {
        setIsModalVisible4(false);
    };
    // 模态框title
    const CustomTitle4 = () => {
        return (
            <div className='CustomTitle_title'>
                添加
            </div>
        )
    }
    return (
        <div>
            {/* 添加 */}
            <Button onClick={showModal4} size="small" className="h1_shuru_c4" type="primary">添加
            </Button>
            <Modal cancelText='返回' okText='确认' width="715px" title={<CustomTitle4 ></CustomTitle4>} visible={isModalVisible4} onOk={handleOk4} onCancel={handleCancel4} footer={[
                <Button id="ModalseeS3Btn1" key="back" onClick={handleCancel4}>返回</Button>,
                <Button id="ModalseeS3Btn2" key="submit" type="primary" onClick={handleOk4}>
                    确认
                </Button>,
            ]}>
                <div className="ModalseeC2">
                    <Form className="comment">
                        <p>问题名称:</p>
                        <Form.Item>
                            <Input placeholder="请输入问题名称" onChange={onChange} />
                        </Form.Item>
                        <p>答案一：</p>
                        <Form.Item>
                            <Input placeholder="请输入答案" onChange={onChange} />
                        </Form.Item>
                        <p>答案二：</p>
                        <Form.Item>
                            <Input placeholder="请输入答案" onChange={onChange} />
                        </Form.Item>
                        <p className="status">状态:</p>
                        <Form.Item >
                            <Radio.Group name="radiogroup" defaultValue={1}>
                                <Radio value={1}>启用</Radio>
                                <Radio value={2}>禁用</Radio>
                            </Radio.Group>
                        </Form.Item>
                    </Form>
                </div>
            </Modal>
        </div>
    );
};
export default ModaladdS;